﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace ShiQuan.SmartDevice
{
    /// <summary>
    /// 
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, Size = 512)]
    public struct IdSector
    {

        public ushort wGenConfig;

        public ushort wNumCyls;

        public ushort wReserved;

        public ushort wNumHeads;

        public ushort wBytesPerTrack;

        public ushort wBytesPerSector;

        public ushort wSectorsPerTrack;

       [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]

        public ushort[] wVendorUnique;

       [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]

        public byte[] sSerialNumber;

        public ushort wBufferType;

        public ushort wBufferSize;

        public ushort wECCSize;

       [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]

        public byte[] sFirmwareRev;

       [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]

        public byte[] sModelNumber;

        public ushort wMoreVendorUnique;

        public ushort wDoubleWordIO;

        public ushort wCapabilities;

        public ushort wReserved1;

        public ushort wPIOTiming;

        public ushort wDMATiming;

        public ushort wBS;

        public ushort wNumCurrentCyls;

        public ushort wNumCurrentHeads;

        public ushort wNumCurrentSectorsPerTrack;

        public uint ulCurrentSectorCapacity;

        public ushort wMultSectorStuff;

        public uint ulTotalAddressableSectors;

        public ushort wSingleWordDMA;

        public ushort wMultiWordDMA;

       [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]

        public byte[] bReserved;

    }
}
